﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/ezdesk_app_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="pageTitle" -->
    <title>易得桌面</title>
    <!-- InstanceEndEditable -->
    <link href="Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="Content/ui.textbox.css" type="text/css" rel="stylesheet" media="all" />
    <link href="Content/freecontent.css" rel="stylesheet" type="text/css" />
    <link href="Content/wdatepicker.css" rel="stylesheet" type="text/css" />
    <link href="Content/ajaxbusy.css" rel="stylesheet" type="text/css" />
    <link href="Content/Site.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/ezdesk_mockdata.js" type="text/javascript"></script>
    <script src="Scripts/jquery.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.custom.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="Scripts/ui.textbox.js" type="text/javascript"></script>
    <script src="Scripts/pinyin.js" type="text/javascript"></script>
    <script src="Scripts/ezdesk-jquery-ui.js" type="text/javascript"></script>
    <script src="Scripts/ezdesk_common.js" type="text/javascript"></script>
</head>
<!-- InstanceBeginEditable name="pageStyles" -->
<link href="Content/table_jui.css" rel="stylesheet" type="text/css" />
<style type="text/css"></style>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="pageScripts" -->
<script src="Scripts/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript">
    //************* URL常量

    var URL_PERSONAL_ATTENDANCE_LIST_PER_MONTH = '/attendance/PersonalAttendanceListPerMonth';
    var URL_SIMPLEUSERINFO_BY_DEPTID = '/core/GetUserInfoInDept'

    //************* 全局变量

    var g_Var = {
        'startYear': null,
        'currentUserId': null,
        'currentDateTime': null

    };

    //************* 常量定义

    var StaticResource = {
        'NotAttendance': '未考勤',
        'OnDuty': '上班',
        'OffDuty': '下班'

    };
    var memberSelector = null;


    var AttdendacneTypeResource = {
        'onDuty': StaticResource.OnDuty,
        'offDuty': StaticResource.OffDuty
    };



    var convertor = {
        "正常工作日": function (item) {
            return item.IsNeedToWork;
        },
        "星期": function (item) {
            var attendanceTime = Date.fromEpoch(item.Date);
            var day = attendanceTime.getDay();
            var attendanceDay = "星期" + "日一二三四五六".charAt(day);
            return attendanceDay;
        },
        "日期": function (item) {
            var attendanceTime = Date.fromEpoch(item.Date);
            var attendanceDate = attendanceTime.toChineseDateFormat();
            return attendanceDate;
        },
        "类型": function (item) {
            if (item.AttendanceType) {
                return AttdendacneTypeResource[item.AttendanceType];
            }
            else {
                return "";
            }
        },
        "时间": function (item) {
            var attendanceTime = Date.fromEpoch(item.Date);
            var day = attendanceTime.getDay();

            if (item.ActionTime) {
                var sign = "<span class='important'>*</span>";
                var nbsp = "<span class='important'>&nbsp</span>";
                var attendanceTime = Date.fromEpoch(item.ActionTime);
                var attendanceTimeFormat = attendanceTime.toFullTimeFormat();

                if (item.IsAbnormalAttendance) {
                    return sign + attendanceTimeFormat;
                }
                else {
                    return nbsp + attendanceTimeFormat;
                }
            }

            else {
                if (!item.IsNeedToWork) {
                    return "--";
                }
                else return StaticResource.NotAttendance;
            }
        },
        "备注": function (item) {
            if (item.Explanation) {
                return item.Explanation;
            }
            else {
                return "";
            }
        },

        "节假日": function (item) {
            //法定节假日信息
            var holidayName = "";
            var extraShiftName = "";

            if (item.DayInfo && item.DayInfo.HolidayInfo) {
                holidayName = item.DayInfo.HolidayInfo.Name;
            }

            if (item.DayInfo && item.DayInfo.ExtraShiftInfo) {
                extraShiftName = item.DayInfo.ExtraShiftInfo.Name;
            }


            var absenceInfo = "";
            // 请假信息
            if (item.DayLeaveinfo) {
                if (item.DayLeaveinfo.IsWholeDay) {

                    for (var key in item.DayLeaveinfo.Leaves) {

                        absenceInfo = item.DayLeaveinfo.Leaves[key].LeaveName;
                    }


                }
                else {
                    for (var key in item.DayLeaveinfo.Leaves) {

                        var LeavName = item.DayLeaveinfo.Leaves[key].LeaveName;


                        var startTime = item.DayLeaveinfo.Leaves[key].StartTime;
                        var startTimeFormat = Date.fromEpoch(startTime);
                        var sartFullTimeFormat = startTimeFormat.toFullTimeFormat();

                        var endTime = item.DayLeaveinfo.Leaves[key].EndTime;
                        var endTimeFormat = Date.fromEpoch(endTime);
                        var endFullTimeFormat = endTimeFormat.toFullTimeFormat()
                        absenceInfo += sartFullTimeFormat
                                            + "-"
                                            + endFullTimeFormat
                                            + " "
                                            + LeavName
                                            + " ";


                    }


                }
            }

            absenceInfo += " " + extraShiftName + " " + holidayName;

            return absenceInfo;
        }

    };



    //************* Accessor访问器

    var EzAccessor = {};
    if (ezmock.IS_MOCKED) {
        var mock_startYear = 1999;
        var mock_currentTime = { "CurrentTime": 1281423559 };
        ///部门列表
        var mock_deptList = [
            {
                'Id': '111',
                'DeptName': '软件工程'
            },
            {
                'Id': '222',
                'DeptName': '策划'
            },
            {
                'Id': '333',
                'DeptName': '设计'
            }
            ];
        var mock_currentUser =
            {
                "Id": "22222",
                "Name": "李7",
                "UserName": "yuxin",
                "Dept":
                 {
                     "Id": "333",
                     "DeptName": "设计",
                     "GroupId": "9ad96dac-88d8-4315-bfdb-9931c8f3cb7c"
                 }

            };

        var mock_json = { "AttendanceInfoList":

            [{ "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241107200, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1241107200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241107200", "NeedToWork": false, "HolidayInfo": { "Id": "1dd34483-a98f-47cc-8e37-34a45f53c03a", "Name": "劳动节", "Year": 2009, "StartDate": "1241107200", "EndDate": "1241280000", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241107200, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241193600, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1241193600", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241193600", "NeedToWork": false, "HolidayInfo": { "Id": "1dd34483-a98f-47cc-8e37-34a45f53c03a", "Name": "劳动节", "Year": 2009, "StartDate": "1241107200", "EndDate": "1241280000", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241193600, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241280000, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1241280000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241280000", "NeedToWork": false, "HolidayInfo": { "Id": "1dd34483-a98f-47cc-8e37-34a45f53c03a", "Name": "劳动节", "Year": 2009, "StartDate": "1241107200", "EndDate": "1241280000", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241280000, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "9ddb789c-68d0-4a2b-8f6c-360cfafc5727", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241366400, "AttendanceType": "onDuty", "ActionTime": 1241399043, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241366400", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241366400", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "577bcf03-92ab-42e7-9738-e5b96ac97c51", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241366400, "AttendanceType": "offDuty", "ActionTime": 1241434359, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "81457ecc-86a4-4315-9701-f9b4d8c99aba", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241452800, "AttendanceType": "onDuty", "ActionTime": 1241485587, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241452800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241452800", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "6a96b1b0-9190-439a-ab30-be89e5583dfe", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241452800, "AttendanceType": "offDuty", "ActionTime": 1241517709, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "a3c28521-95d8-4add-b82f-e561ac4f15c5", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241539200, "AttendanceType": "onDuty", "ActionTime": 1241575051, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241539200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241539200", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "bf489b55-f5b0-48d5-b969-1a2256eb7987", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241539200, "AttendanceType": "offDuty", "ActionTime": 1241604773, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "76faf8bc-5899-432a-9b31-09989e2b5b82", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241625600, "AttendanceType": "onDuty", "ActionTime": 1241658267, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241625600", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241625600", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "d90bc521-beed-43c4-8aae-febe0468c048", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241625600, "AttendanceType": "offDuty", "ActionTime": 1241705894, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "d746fb32-cdc6-48bc-b02c-aecddebec14d", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241712000, "AttendanceType": "onDuty", "ActionTime": 1241747729, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241712000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241712000", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "73d52518-1ba2-4e4c-a6cd-5d5fd059ebe6", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241712000, "AttendanceType": "offDuty", "ActionTime": 1241779972, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241798400, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1241798400", "Leaves": [{ "LeaveName": "出差", "LeaveId": "f078071a-a53b-4356-8f64-cdc306599a54", "Day": "1241798400", "StartTime": "1241830800", "EndTime": "1241863200", "IsForWork": false}], "FirstLeave": { "LeaveName": "出差", "LeaveId": "f078071a-a53b-4356-8f64-cdc306599a54", "Day": "1241798400", "StartTime": "1241830800", "EndTime": "1241863200", "IsForWork": false }, "LastLeave": { "LeaveName": "出差", "LeaveId": "f078071a-a53b-4356-8f64-cdc306599a54", "Day": "1241798400", "StartTime": "1241830800", "EndTime": "1241863200", "IsForWork": false }, "IsWholeDay": true }, "DayInfo": { "Date": "1241798400", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241798400, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241884800, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1241884800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241884800", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241884800, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "181f70e9-d09d-4a17-b6ab-943923c39eb7", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241971200, "AttendanceType": "onDuty", "ActionTime": 1242003647, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1241971200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1241971200", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "68f4db79-ef47-49ff-b243-c3cd57936bf5", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1241971200, "AttendanceType": "offDuty", "ActionTime": 1242037342, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "0373f392-4115-430a-87e2-26fb3d9953b4", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242057600, "AttendanceType": "onDuty", "ActionTime": 1242090055, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242057600", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242057600", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "e8f21bc9-020d-4731-86d1-c365a170169d", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242057600, "AttendanceType": "offDuty", "ActionTime": 1242123024, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "43bd0be8-dfd5-430e-8c9f-e32b65c1df56", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242144000, "AttendanceType": "onDuty", "ActionTime": 1242179366, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242144000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242144000", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "2fd32d9c-9a93-458d-91a8-57b91d9cde01", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242144000, "AttendanceType": "offDuty", "ActionTime": 1242210032, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "84edd517-4452-46a8-a0a4-1671cffa50d3", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242230400, "AttendanceType": "onDuty", "ActionTime": 1242262746, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242230400", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242230400", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "f0192b33-f6b7-442b-9ee4-e58c0b62e7f9", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242230400, "AttendanceType": "offDuty", "ActionTime": 1242295316, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "11ca894e-ec62-429f-9a5e-8c8868a6d301", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242316800, "AttendanceType": "onDuty", "ActionTime": 1242349036, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242316800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242316800", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "e4ba44cf-619f-40ba-b99e-6aff6dd997c4", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242316800, "AttendanceType": "offDuty", "ActionTime": 1242382143, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242403200, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1242403200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242403200", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242403200, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242489600, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1242489600", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242489600", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242489600, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "42f22d99-7be6-4b2e-b3a4-48e408055bef", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242576000, "AttendanceType": "onDuty", "ActionTime": 1242608611, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242576000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242576000", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "ffb90195-9472-4843-be13-6c8e2558dc5d", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242576000, "AttendanceType": "offDuty", "ActionTime": 1242641241, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "09365e5a-c38f-4add-bd46-46f736f692e7", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242662400, "AttendanceType": "onDuty", "ActionTime": 1242694471, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242662400", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242662400", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "c0a91e57-77e4-4208-a3e5-24dd2e31828d", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242662400, "AttendanceType": "offDuty", "ActionTime": 1242742102, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "e6b282a4-fa0e-49c1-99bf-2fb83faeb860", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242748800, "AttendanceType": "onDuty", "ActionTime": 1242784755, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242748800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242748800", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "6546e5fe-abd0-4621-8b90-244de01e6484", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242748800, "AttendanceType": "offDuty", "ActionTime": 1242814286, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "f025b19f-5da4-4d69-88bb-a32de746db11", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242835200, "AttendanceType": "onDuty", "ActionTime": 1242867528, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242835200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1242835200", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "aa4240bd-89a9-4ab2-a0e4-d146055a4485", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242835200, "AttendanceType": "offDuty", "ActionTime": 1242900434, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242921600, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1242921600", "Leaves": [{ "LeaveName": "调休", "LeaveId": "1b1bd359-2802-4800-b6e1-52d8bc106ce7", "Day": "1242921600", "StartTime": "1242954000", "EndTime": "1242986400", "IsForWork": false}], "FirstLeave": { "LeaveName": "调休", "LeaveId": "1b1bd359-2802-4800-b6e1-52d8bc106ce7", "Day": "1242921600", "StartTime": "1242954000", "EndTime": "1242986400", "IsForWork": false }, "LastLeave": { "LeaveName": "调休", "LeaveId": "1b1bd359-2802-4800-b6e1-52d8bc106ce7", "Day": "1242921600", "StartTime": "1242954000", "EndTime": "1242986400", "IsForWork": false }, "IsWholeDay": true }, "DayInfo": { "Date": "1242921600", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1242921600, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243008000, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1243008000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243008000", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243008000, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "496a6afe-40f3-4c08-bc4c-558e2cec5c59", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243094400, "AttendanceType": "onDuty", "ActionTime": 1243142924, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1243094400", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243094400", "NeedToWork": false, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "75f92645-99a3-49e4-8dfb-eef18c65d7fb", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243094400, "AttendanceType": "offDuty", "ActionTime": 1243155859, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "6c913415-0792-447a-ba1a-ca7484b95e2c", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243180800, "AttendanceType": "onDuty", "ActionTime": 1243213297, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1243180800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243180800", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "ab22dc20-3d0b-4265-805d-ae2465e423d9", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243180800, "AttendanceType": "offDuty", "ActionTime": 1243248352, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "bd082d5a-63eb-4f56-bb30-e2380b60153c", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243267200, "AttendanceType": "onDuty", "ActionTime": 1243299610, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1243267200", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243267200", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "bf2a04a0-e344-40f5-923f-f978a1e90a15", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243267200, "AttendanceType": "offDuty", "ActionTime": 1243342845, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "263e05d1-c8b3-49f1-96e4-0ac764a03929", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243353600, "AttendanceType": "onDuty", "ActionTime": 1243385695, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": { "Date": "1243353600", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243353600", "NeedToWork": true, "HolidayInfo": null, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "716aa443-c7e4-4877-bce9-267639972651", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243353600, "AttendanceType": "offDuty", "ActionTime": 1243419694, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": true, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243440000, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1243440000", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243440000", "NeedToWork": false, "HolidayInfo": { "Id": "2ff16ff7-c522-4101-9542-b52011baabf2", "Name": "端午节", "Year": 2009, "StartDate": "1243440000", "EndDate": "1243612800", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243440000, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243526400, "AttendanceType": "onDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1243526400", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243526400", "NeedToWork": false, "HolidayInfo": { "Id": "2ff16ff7-c522-4101-9542-b52011baabf2", "Name": "端午节", "Year": 2009, "StartDate": "1243440000", "EndDate": "1243612800", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": false} }, { "Id": "00000000-0000-0000-0000-000000000000", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243526400, "AttendanceType": "offDuty", "ActionTime": null, "Explanation": null, "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null }, { "Id": "0741a158-19ba-42e7-93c9-efd1b599191d", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243612800, "AttendanceType": "onDuty", "ActionTime": 1243639871, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": { "Date": "1243612800", "Leaves": [], "FirstLeave": null, "LastLeave": null, "IsWholeDay": false }, "DayInfo": { "Date": "1243612800", "NeedToWork": false, "HolidayInfo": { "Id": "2ff16ff7-c522-4101-9542-b52011baabf2", "Name": "端午节", "Year": 2009, "StartDate": "1243440000", "EndDate": "1243612800", "Remark": null }, "ExtraShiftInfo": null, "IsWeekEnd": true} }, { "Id": "23dc544a-2d23-4fd6-9c31-15c1851786d5", "User": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "b263f38e-016e-4de8-86b2-74ccf17638ad", "DeptName": "施工图部", "GroupId": "0ab7cdfd-8b60-464a-97a3-6efd7d24a420"} }, "Date": 1243612800, "AttendanceType": "offDuty", "ActionTime": 1243673064, "Explanation": "", "IsAbnormalAttendance": false, "IsNeedToWork": false, "DayLeaveInfo": null, "DayInfo": null}]
        };

        var mock_isHasPermisson = true;

        var mockEzAccessor = {
            'doUpdateAttendanceList': function () {
                bindAttendanceList(mock_json.AttendanceInfoList);
            },

            'getCurrentUser': function () {
                return mock_currentUser;
            },
            'getDeptList': function () {
                return mock_deptList;
            },
            'getIsHasPermisson': function () {
                return mock_isHasPermisson;
            },
            'getBasicInfo': function () {
                g_Var['startYear'] = 2009;
                g_Var['currentDateTime'] = Date.fromEpoch(mock_currentTime["CurrentTime"]);
            }

        };
        EzAccessor = mockEzAccessor;
    } else {
        var realEzAccessor = {
            'doUpdateAttendanceList': function (year, month) {
                $(document).ajaxBusy('begin');
                //与服务器交互
                $.getJSON(
                  URL_PERSONAL_ATTENDANCE_LIST_PER_MONTH,
                  { 'currentMonth': month, 'currentYear': year, "userId": g_Var['currentUserId'] },
                    function (e) {
                        bindAttendanceList(e);
                        $(document).ajaxBusy('end');
                    });
            },
            'getCurrentUser': function () {
                //return <%= ViewData["CurrentUser"] %>;
            },

            'getDeptList': function () {
                // return <%= ViewData["CurrentDeptList"] %>;
            },
            'getIsHasPermisson': function () {
                //return <%= ViewData["IsHasPermisson"] %>;
            },
            'getBasicInfo': function () {
                //g_Var['startYear'] = <%= ViewData["StartYear"] %>;
                //g_Var['currentDateTime'] = Date.fromEpoch(<%= ViewData["CurrentTime"] %>);
            }
        };
        EzAccessor = realEzAccessor;
    }



    ///bindMonthList
    function bindMonthList() {
        EzAccessor.getBasicInfo();

        var currentMonth = g_Var['currentDateTime'].getMonth() + 1;
        var monthDownList = getMonthList();
        ///部门下拉菜单
        $("#cmbMonthList")
              .comboxBinding(monthDownList, 'text', 'value')
              .val(currentMonth)
              .change(function () {
                  updateTitleInfo();

                  ///更新假期数据
                  updateAttendanceList();
              }
              );

    }

    ///bindYearList
    function bindYearList() {
        EzAccessor.getBasicInfo();

        var currentYear = g_Var.currentDateTime.getFullYear();
        var yearDownList = getYearList();
        ///部门下拉菜单
        $("#cmbYearList")
              .comboxBinding(yearDownList, 'text', 'value')
              .val(currentYear)
              .change(function () {
                  updateTitleInfo();

                  ///更新假期数据
                  updateAttendanceList();
              });
    }

    ///get yearList
    function getYearList() {
        var yearList = [];
        EzAccessor.getBasicInfo();
        var currentYear = g_Var['currentDateTime'].getFullYear();

        for (var i = g_Var['startYear']; i <= currentYear; i++) {
            yearList.push({ "text": i,
                "value": i
            });
        }
        return yearList;
    }

    ///get monthList
    function getMonthList() {
        var monthList = [];
        for (var i = 1; i <= 12; i++) {
            monthList.push({ "text": i,
                "value": i
            });
        }
        return monthList;
    }




    ///updateTitleInfo
    function updateTitleInfo() {
        var currentMember = $('#memberSelector').memberSelector("getMember");

        var title = currentMember.Name + "考勤信息";
        var dateTitle = $("#cmbYearList").find("option:selected").text()
                        + "年"
                        + " "
                        + $("#cmbMonthList").find("option:selected").text()
                        + "月";


        $('#cmbTitleInfo').html(title);
        $('#cmbDateTitleInfo').html(dateTitle);
    }





    function isFutureDate(year, month) {
        var isFuture = false;

        var currentDate = g_Var.currentDateTime;
        var currentDateToEpoch = new Date(
                currentDate.getFullYear(),
                currentDate.getMonth() + 1,
                0,
                0,
                0,
                0

            ).toEpoch();

        var dateToEpoch = new Date(
                year,
                month,
                0,
                0,
                0,
                0
            ).toEpoch();

        if (currentDateToEpoch < dateToEpoch) {
            isFuture = true;
        }

        return isFuture;
    }


    ///updateAttendanceList
    function updateAttendanceList() {
        var month = $('#cmbMonthList').val();
        var year = $('#cmbYearList').val();

        var isFuture = isFutureDate(year, month);

        if (!isFuture) {
            $('#tblNoFuture').hide();
            $('#divAttendanceListPerMonth').show();

            EzAccessor.doUpdateAttendanceList(year, month);

        }
        else {
            $('#tblNoFuture').show();
            bindAttendanceList();
            $('#divAttendanceListPerMonth').hide();
        }


    }



    ///bindAttendanceList
    function bindAttendanceList(personalAttendanceJson) {

        ///bindAttendanceList
        var data = DataConverterForDataTable.convertData(personalAttendanceJson, convertor);
        data.bPaginate = false;
        data.bRetrieve = true;
        data.bFilter = false;
        data.bSort = false;
        data.bInfo = false;

        var isNewDay = true;
        var currentDayText, currDayTD, currDateTD, currInfoTD;
        var colorTbl = ['#FFFFFF', '#E2E4FF', '#DDFFBF'];
        var i = 0;

        data.fnHeaderCallback = function (nHead, aasData, iStart, iEnd, aiDisplay) {
            // 隐藏第一列
            $($('th', nHead)[0]).remove();
        }

        data.fnRowCallback = function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
            // 按照 天数 分割
            if (iDisplayIndex == 0) {
                isNewDay = true
                i = 0;
                currentDayText = aData[2];
            } else if (aData[2] != currentDayText) {
                isNewDay = true;
            }

            // 绘制背景颜色
            if (isNewDay) {
                i = (i + 1) % 2;
            }
            $(nRow).css({ 'background': colorTbl[i] });
            currentDayText = aData[2];

            if (aData[0] == "false") {
                $(nRow).css({ 'background': colorTbl[2] });
            }

            // 隐藏第一列
            $($('td', nRow)[0]).remove()

            // 按日期合并第二列与第三列 星期 日期
            if (isNewDay) {
                currDayTD = $('td', nRow)[0];
                currDateTD = $('td', nRow)[1];
                currInfoTD = $('td', nRow)[5];
            } else {
                $($('td', nRow)[5]).remove();
                $($('td', nRow)[1]).remove();
                $($('td', nRow)[0]).remove();
                var rowspan = $(currDayTD).attr('rowspan') + 1;
                $(currDayTD).attr('rowspan', rowspan);
                $(currDateTD).attr('rowspan', rowspan);
                $(currInfoTD).attr('rowspan', rowspan);
            }

            isNewDay = false;
            return nRow;
        };
        $('#divAttendanceListPerMonth').empty();

        var tblAttendanceListPerMonth = $('<table id="tblAttendanceListPerMonth" class="tbl"/>')
          .appendTo('#divAttendanceListPerMonth');

        var oTable = $('#tblAttendanceListPerMonth').dataTable(data);

        //设置TABLE的CSS样式
        var dayColumnHead = $('#tblAttendanceListPerMonth thead tr th')[0];

        $(dayColumnHead).css({
            'width': '40px'
        });

        var dateColumnHead = $('#tblAttendanceListPerMonth thead tr th')[1];

        $(dateColumnHead).css({
            'width': '50px'
        })

        var typeColumnHead = $('#tblAttendanceListPerMonth thead tr th')[2];

        $(typeColumnHead).css({
            'width': '50px'
        });

        var timeColumnHead = $('#tblAttendanceListPerMonth thead tr th')[3];

        $(timeColumnHead).css({
            'width': '50px'
        });

        var leavInfoColumnHead = $('#tblAttendanceListPerMonth thead tr th')[5];

        $(leavInfoColumnHead).css({
            'width': '100px'
        });


    }


    //处理下拉菜单是否可操作
    function setSelectorAttr(bool) {
        //下拉菜单dissable
        $('#cmbMonthList').attr("disabled", bool);
        $('#cmbYearList').attr("disabled", bool);
        $('.cmbMemberList').attr("disabled", bool);
        $('.cmbDepartmentList').attr("disabled", bool);
    }




    function initPage() {
        EzTipsManager.addTipBox('#tip_Remind', 'tipRemind');
        EzTipsManager.showTipBox('tipRemind');

        $(document).ajaxBusy();
        bindMonthList();
        bindYearList();

        var currentUser = EzAccessor.getCurrentUser();
        var deptList = EzAccessor.getDeptList();
        var isHasPermisson = EzAccessor.getIsHasPermisson();

        $('#memberSelector').memberSelector({
            deptList: deptList,
            currentUser: currentUser,
            memberChanged: function (event, id) {
                g_Var['currentUserId'] = id;

                //下拉菜单dissable
                setSelectorAttr(true);
                //缓冲数据加载
                bindAttendanceList(null);
                ///更新标题
                updateTitleInfo();
                ///更新假期数据
                updateAttendanceList();

                //下拉菜单enabele
                setSelectorAttr(false);

            }

        });

        if (!isHasPermisson) {
            $('#memberSelector').hide();

        }

    }

    function initPageEvent() {

    }
    $(function () {

        initPage();
        initPageEvent();
    });
</script>
<!-- InstanceEndEditable -->
<body>
    <div id="root">
        <div id="headw">
            <div id="head">
                <!-- InstanceBeginEditable name="pageHead" -->
                <p>
                    早上好，杨裕欣(软件工程部)
                </p>
                <div id="status-bar">
                    <span><a href="#">设置</a></span>&nbsp; 魏玛软件出品
                </div>
                <!-- InstanceEndEditable -->
            </div>
        </div>
        <div id="main">
            <div id="contentw">
                <div id="content-page">
                    <!-- InstanceBeginEditable name="pageContent" -->
                    <div id="page-head">
                        <div>
                            <div style="display: inline-block;">
                                <span id="cmbTitleInfo"></span>&nbsp;&nbsp;
                                <select id="cmbYearList">
                                </select>
                                <span>年</span>
                                <select id="cmbMonthList">
                                </select>
                                <span>月</span>
                            </div>
                            <div style="display: inline-block; float: right;">
                                <div id="memberSelector">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="page-body">
                        <span id="cmbDateTitleInfo"></span>
                        <hr />
                        <div id="tblNoFuture" style="display: none;">
                            <!--<%Html.RenderPartial("_noFutureDisplayInfo"); %>-->
                        </div>
                        <div class="tableContainer" id="divAttendanceListPerMonth">
                        </div>
                    </div>
                    <!-- InstanceEndEditable -->
                </div>
                <div id="content-foot">
                    <small>这个是内容下面的脚注</small></div>
            </div>
            <div id="tipsw">
                <!-- InstanceBeginEditable name="pageShortcut" -->
                <!-- InstanceEndEditable -->
                <div id="tips" class="box">
                </div>
            </div>
            <div class="clearfloat">
            </div>
        </div>
    </div>
    <!-- InstanceBeginEditable name="pageFoot" -->
    <div id="tip_Remind" style="display: none;">
        <h1>
            小贴士:</h1>
        <p class="indent">
        </p>
    </div>
    <!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd -->
</html>
